import 'package:ncov_2019/api/for_travel_model.dart';
export 'package:ncov_2019/api/for_travel_model.dart';
import 'package:ncov_2019/commom/check.dart';
import 'package:ncov_2019/http/view_model.dart';

TimeNewsModel loreViewModel = new TimeNewsModel();

class TimeNewsModel extends ViewModel {
  /*
  * 出行情况
  * */
  Future<dynamic> getLore() async {
    Map map = await TimeNewsReqModel().data();

    print('response.data is ');
    print(map);
    List data = map['data'];
    print(map);
    List list = new List();

    if (listNoEmpty(data)) {
      data.forEach((json) => list.add(ForTimeNewsModel.fromJson(json)));
    }

    return Future.value(list);
  }
}
